import request from '@/utils/request'

export default {
  

  //列表
  getList(pid,name) {
    return request({
      url: `/OaDanganFold/index/${pid}`,
      method: 'get',
      params:{name}
    })
  },

  //点击查询子文件
  cilList(id) {
    return request({
      url: `/OaDanganFold/index/${id}`,
      method: 'get',

    })
  },

    //点击查询父级文件
    FjiList(pid) {
      return request({
        url: `/OaDanganFold/index/${pid}`,
        method: 'get',
  
      })
    },



  //添加文件夹
  add(user) {
    return request({
      url: '/OaDanganFold/fold/add',
      method: 'post',
      data: user
    })
  },

  // 删除
  danandel(ids){
    return request({
      url:`/OaDanganFold/deleteByIds`,
      method:'delete',
      data:ids
    })
  },

  //文件夹详情
  updateSeAll(id){
    return request({
      url:`OaDanganFold/fold/info/${id}`,
      method:'get',
    })
  },

  // OaDanganFold/dangAn/info/{id}
  // 档案详情
  danganAlls(id){
    return request({
      url:`OaDanganFold/dangAn/info/${id}`,
      method:'get',
    })
  },



  //修改文件夹
  updateto(id) {
    return request({
      url: `/OaDanganFold/fold/edit/${id}`,
      method: 'post',
      data: user
    })
  },

  // OaDanganFold/fold/edit/{id}
  //编辑文件夹
  fileUpdate(user) {
    return request({
      url: `OaDanganFold/fold/edit/${user.id}`,
      method: 'put',
      data: user
    })
  },


    //编辑档案
    danganUpdate(user) {
      console.log(user.dangAnId);
      
      return request({
        url: `OaDanganFold/dangAn/edit/${user.dangAnId}`,
        method: 'put',
        data: user
      })
    },

}
